<?xml version="1.0" encoding="iso-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  xmlns:s="http://www.codeplex.com/MSSqlSchemaDoc">

  <xsl:param name="DocumentationFile"/>

  <xsl:template match="/s:DdlTrigger">
    <html>
      <head>
        <title>
          DDL Trigger: <xsl:value-of select="@Name"/>
        </title>
        <link rel="stylesheet" type="text/css" href="../main.css"/>
      </head>
      <body>
        <table width="100%">
          <tr>
            <td width="50%" class="descriptionHeader right">DDL Trigger: </td>
            <td class="objectName">
              <xsl:value-of select="@Name"/>
            </td>
          </tr>
          <tr>
            <td colspan="2" class="blank"></td>
          </tr>
          <tr>
            <td colspan="2" class="documentationHeader center">
              Description:
            </td>
          </tr>
          <tr>
            <td colspan="2" class="documentation center">
              <pre>
                <xsl:value-of select="document($DocumentationFile)/s:DdlTriggerDocumentation/s:Documentation"/>
              </pre>
            </td>
          </tr>
          <tr>
            <td colspan="2" class="blank"></td>
          </tr>
          <tr>
            <td class="descriptionHeaderMedium right">
              Operation Type:
            </td>
            <td>
              <xsl:value-of select="s:OperationType"/>
            </td>
          </tr>
          <tr>
            <td class="descriptionHeaderMedium right">Implementation Type:</td>
            <td>
              <xsl:value-of select="s:ImplementationType"/>
            </td>
          </tr>
          <tr>
            <td colspan="2" class="blank"></td>
          </tr>
          <tr class="center">
            <td colspan="2" class="descriptionHeader">Events:</td>
          </tr>

          <tr>
            <td colspan="2">
              <table width="100%">

                <xsl:for-each select="s:Events/s:TriggerEvent">
                  <tr>
                    <td class="noborder">
                      <xsl:value-of select="@Name"/>
                    </td>
                  </tr>
                </xsl:for-each>

              </table>
            </td>
          </tr>

          <tr>
            <td colspan="2" class="blank"></td>
          </tr>
          <tr class="center">
            <td colspan="2" class="descriptionHeader">Definition:</td>
          </tr>
          <tr class="procedureDefinition">
            <td colspan="2">
              <pre>
                <xsl:value-of select="s:Definition"/>
              </pre>
            </td>
          </tr>
        </table>
      </body>
    </html>
  </xsl:template>

</xsl:stylesheet>